#ifndef TEST_LISTENER_H
#define TEST_LISTENER_H

#include <CEGUIOgreRenderer.h>
#include <CEGUI.h>
#include <Ogre.h>
#include <OIS/OIS.h>

using namespace Ogre;

class TestListener: public FrameListener, public OIS::KeyListener, public OIS::MouseListener
{
    public:
        TestListener(OIS::Keyboard* _keyboard, OIS::Mouse* _mouse);
        bool frameStarted(const Ogre::FrameEvent &evt);

         //KeyListener.
        bool keyPressed(const OIS::KeyEvent &e);
        bool keyReleased(const OIS::KeyEvent &e);

        //MouseListener.
        bool mouseMoved(const OIS::MouseEvent &e);
        bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
        bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);

        bool quit(const CEGUI::EventArgs &e);

        //Permet de convertir l'ID OIS en ID CEGUI.
        CEGUI::MouseButton convertButtonId(const OIS::MouseButtonID _buttonID);
    private:
        OIS::Keyboard* mKeyboard;
        OIS::Mouse* mMouse;
        bool mContinue;
        
};

#endif